<?php     
    // Define application environment
    defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
    defined('APPLICATION_NAME') || define('APPLICATION_NAME', (getenv('APPLICATION_NAME') ? getenv('APPLICATION_NAME') : 'test'));
    
    // Define path to application directory
    defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../application/sites/' . APPLICATION_NAME));
    
    set_include_path(
        implode(
            PATH_SEPARATOR, array(
                realpath(dirname(__FILE__) . '/../../../lib'),
                APPLICATION_PATH,
                get_include_path(),
            )
        )
    );
    
    require 'wz/class.loader.php';
    
    $app = new WZ_Application();